package com.itheima.io;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

/*
    复制文件
 */
public class Demo04 {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("day11_lianxi\\src\\com\\itheima\\io\\Demo01.java");
        FileOutputStream fos = new FileOutputStream("day11_lianxi\\Copy.java");
        int by;
        while ((by = fis.read()) != -1) {
            fos.write(by);
        }
        fis.close();
        fos.close();
    }
}
